package vn.orderonline.core.dao.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "BASKET_DRINk")
public class BasketDrink implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BasketDrinkId id;
	private String drinkName;
	private Float price;
	private Integer amount;
	
	public BasketDrink() {
		
	}

	@EmbeddedId
	@AttributeOverrides({
		@AttributeOverride(name = "orderId", column = @Column(name = "ORDER_ID")),
		@AttributeOverride(name = "drinkId", column = @Column(name = "DRINK_ID"))
	})
	public BasketDrinkId getId() {
		return id;
	}

	public void setId(BasketDrinkId id) {
		this.id = id;
	}

	@Column(name = "DRINK_NAME", nullable = false, length = 100)
	public String getDrinkName() {
		return drinkName;
	}

	public void setDrinkName(String drinkName) {
		this.drinkName = drinkName;
	}

	@Column(name = "PRICE", nullable = false, precision = 20, scale = 2)
	public Float getPrice() {
		return price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	@Column(name = "AMOUNT", nullable = false, precision = 10, scale = 0)
	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}
	
}
